﻿//
// Copyright (c) 2024 BPer
//

#ifndef BPERCAPTURE_BPerVideoCaptureAndroid_H_
#define BPERCAPTURE_BPerVideoCaptureAndroid_H_

#include <bpercapture/BPerVideoCaptureHandle.h>
#include <bpercapture/BPerMultiVideoCapture.h>

#if BPer_OS_ANDROID
#include <bpercapture/android/BPerCameraAndroid.h>

class BPerVideoCaptureAndroid: public BPerMultiVideoCapture {
public:
	BPerVideoCaptureAndroid(BPerVideoInfo *pcontext,void* pwindows);
	~BPerVideoCaptureAndroid();
	BPerVideoCaptureHandle *m_vhandle;
	BPerCameraAndroid* m_camera;
	int32_t init();
	void setVideoCaptureStart();
	void setVideoCaptureStop();
	void setOutVideoBuffer(BPerVideoBuffer *pbuf);
	void setPreVideoBuffer(BPerVideoBuffer *pbuf);
	int32_t getVideoCaptureState();
	void initstamp();
	void stopLoop();

	int32_t getLivingVideoCaptureState();
	int32_t getFilmVideoCaptureState();

	void setLivingOutVideoBuffer(BPerVideoBuffer *pbuf);
	void setLivingVideoCaptureStart();
	void setLivingVideoCaptureStop();

	void setFilmOutVideoBuffer(BPerVideoBuffer *pbuf);
	void setFilmVideoCaptureStart();
	void setFilmVideoCaptureStop();
protected:
	void startLoop();
	int32_t setPara();
	BPerVideoBuffer* m_pre_videoBuffer;

private:
	int32_t m_width, m_height;
	int32_t m_isloop;
};
#endif
#endif /* BPERCAPTURE_SRC_BPERVIDEOCAPTUREIMPL_H_ */
